package com.smedi.ismedi.constructionproject.api.dto.request;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.*;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;

/**
 * @Author: xulinjun
 * @Date: 2021-6-18 15:22
 */
@Data
@Accessors(chain = true)
@ApiModel(description = "项目信息入参")
public class ProjectBasicRequest implements Serializable {
    @ApiModelProperty(value = "项目id")
    private Long projectId;

    @ApiModelProperty(value = "企业项目管理组织id", required = true)
    @NotNull(message = "项目管理组织为空！")
    private Long hrOrganizationId;

    @ApiModelProperty(value = "项目名称", required = true)
    @NotBlank(message = "项目名称为空！")
    private String projectName;

    @ApiModelProperty(value = "项目编码")
    @NotBlank(message = "项目编码为空！")
    private String projectCode;

    @ApiModelProperty(value = "项目简称")
    private String projectShortName;

    @ApiModelProperty(value = "项目经理")
    @Size(max = 50, message = "最大50字符！")
    private String projectManager;

    @ApiModelProperty(value = "手机号")
    private String mobile;

    @ApiModelProperty(value = "施工许可证")
    private String constructionPermit;

    @ApiModelProperty(value = "工程类别", required = true)
    @NotBlank(message = "工程类别为空！")
    private String projectCategory;

    @ApiModelProperty(value = "工程造价")
    @Digits(integer = 20, fraction = 3, message = "工程造价最多支持3位小数！")
    @Min(value = 1, message = "工程造价最小值不能小于1！")
    private BigDecimal projectCost;

    @ApiModelProperty(value = "工程状态", required = true)
    @NotBlank(message = "工程状态为空！")
    private String projectStatus;

    @ApiModelProperty(value = "工程地址", required = true)
    @NotBlank(message = "工程地址为空！")
    @Size(max = 50, message = "最大50字符！")
    private String projectAddress;

    @ApiModelProperty(value = "工程地址-省份", required = true)
    @NotBlank(message = "工程地址-省份为空！")
    @Size(max = 10, message = "最大10字符！")
    private String projectAddressProvince;

    @ApiModelProperty(value = "工程地址-城市", required = true)
    @NotBlank(message = "工程地址-城市为空！")
    @Size(max = 10, message = "最大10字符！")
    private String projectAddressCity;

    @ApiModelProperty(value = "工程地址坐标")
    @NotBlank(message = "工程地址坐标为空！")
    private String projectMapLocation;

    @ApiModelProperty(value = "完工日期/竣工日期")
    private LocalDate finishDate;

    @ApiModelProperty(value = "签订日期")
    @DateTimeFormat(pattern = "yyyy-MM-DD")
    private LocalDate contractSigningDate;

    @ApiModelProperty(value = "合同金额")
    @Digits(integer = 20, fraction = 3, message = "合同金额最多支持3位小数！")
    @Min(value = 1, message = "合同金额最小值不能小于1！")
    @NotNull(message = "合同金额不能为空！")
    private BigDecimal contractCost;

    @ApiModelProperty(value = "合同工期开始")
    @DateTimeFormat(pattern = "yyyy-MM-DD")
    private LocalDate contractDurationBegin;

    @ApiModelProperty(value = "合同工期结束")
    @DateTimeFormat(pattern = "yyyy-MM-DD")
    private LocalDate contractDurationEnd;

    @ApiModelProperty(value = "实际工期开始")
    @DateTimeFormat(pattern = "yyyy-MM-DD")
    private LocalDate actualDurationBegin;

    @ApiModelProperty(value = "实际工期结束")
    @DateTimeFormat(pattern = "yyyy-MM-DD")
    private LocalDate actualDurationEnd;

    @ApiModelProperty(value = "工程总承包模式")
    @NotBlank(message = "工程总承包模式为空！")
    private String epcType;

    @ApiModelProperty(value = "工程总承包单位")
    @NotBlank(message = "工程总承包单位为空！")
    private String epcUnit;

    @ApiModelProperty(value = "项目成员方")
    @Size(max = 50, message = "最大50字符！")
    private String projectMember;

    @ApiModelProperty(value = "施工总包单位")
    @NotBlank(message = "施工总包单位为空！")
    @Size(max = 50, message = "最大50字符！")
    private String generalContractor;

    @ApiModelProperty(value = "施工监理单位")
    @NotBlank(message = "施工监理单位为空！")
    @Size(max = 50, message = "最大50字符！")
    private String supervisionUnit;

    @ApiModelProperty(value = "形象进度")
    private Integer vividProgress;

    @ApiModelProperty(value = "形象进度更新时间")
    private LocalDate vividProgressUpdatedDate;

    @ApiModelProperty(value = "项目类型")
    @NotBlank(message = "项目类型为空！")
    private String projectType;

    @ApiModelProperty(value = "类型")
    private String category;
}
